package com.wgy.day17.继承性.发红包练习;

import java.util.ArrayList;

/**
 * Created by pc on 2020/11/12 22:51
 * Description: LearningJava
 */
public class MainRedPacket {
    public static void main(String[] args) {
        Manager manager = new Manager("群主", 100);
        Member one = new Member("成员A", 0);
        Member two = new Member("成员B", 0);
        Member three = new Member("成员C", 0);
        manager.show();
        one.show();
        two.show();
        three.show();
        System.out.println("=========");
        //群主发红包 发20元 分成3个红包
        ArrayList <Integer> redList=manager.send(20,3);

        //成员收红包
        one.receive(redList);
        two.receive(redList);
        three.receive(redList);

        manager.show();
        one.show();
        two.show();
        three.show();

    }
}
